<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="" />
<meta name="author" content="ChongMing" />
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="full-screen" content="yes">
<meta name="screen-orientation" content="portrait">
<meta name="x5-fullscreen" content="true">
<meta name="360-fullscreen" content="true">
<title>样本</title>
</head>
<link rel="stylesheet" href="../css/framework7.ios.min.css">
<link rel="stylesheet" href="../css/framework7.ios.colors.min.css">
<link rel="stylesheet" href="../css/my-app.css">
<link rel="stylesheet" href="../css/reset.css">
<link rel="stylesheet" href="css/geneticTesting.css">
<script src="../js/jquery-1.7.1.min.js"></script>
<script src="../js/jquery.mobile-1.4.3.js"></script>
<script type="text/javascript" src="../js/framework7.min.js"></script>
<script type="text/javascript" src="../js/my-app.js"></script>
<script type="text/javascript" src="../js/jquery.cookie.js"></script>
<script type="text/javascript" src="js/geneticTesting.js"></script>
<script>
    $(function(){
        var myApp = new Framework7();
        var $$ = Dom7;
        page_index = 1;
        page_size = 12;
        geneticTesting.samplelist2('wish/index/myGeneSample',$.cookie("local_userId"),page_size,page_index);
//        下拉刷新
        $$('.pull-to-refresh-content').on('refresh', function (e) {
//            return false;
            page_index=1
            $('.infinite-scroll-preloader').html('<div class="preloader"></div>')
            setTimeout(function () {
                $('#samplelist').html('');
                geneticTesting.samplelist2('wish/index/myGeneSample',{uid:$.cookie("local_userId"),page_size:page_size,page_index:page_index});
                myApp.pullToRefreshDone();
            }, 1000);

        });
//        下拉加载
        var loading = false;
        $$('.infinite-scroll').on('infinite', function () {
            // 如果正在加载，则退出
            if (loading) return;
            // 设置flag
            loading = true;
            // 模拟1s的加载过程
            setTimeout(function () {
                // 重置加载flag
                loading = false;
                page_index++
                geneticTesting.samplelist('wish/index/myGeneSample',{uid:$.cookie("local_userId"),page_size:page_size,page_index:page_index});
            }, 500);
        });
    });
</script>
<body>
<div class="samplelist">
    <div class="views" style=" margin-top: 0">
        <div class="view view-main" data-page="home">
            <div class="pages navbar-through">
                <div data-page="home" class="page" style=" background: #ebebeb;">
                    <div class="page-content pull-to-refresh-content infinite-scroll">
                        <div class="pull-to-refresh-layer">
                            <div class="preloader"></div>
                            <div class="pull-to-refresh-arrow"></div>
                        </div>
                        <div class="list-block" id="samplelist">

                        </div>
                        <div class="infinite-scroll-preloader" style=" padding: 5px">
                            <div class="preloader"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>